package com.avecsys.quotemanager.pojos;

import java.io.Serializable;

/**
 * @author Sam Sundar K
 * 
 */
public class BuyerUsersPojo extends BasePojo implements Serializable {

	private Long buyerUserId;

	private BuyerMasterPojo buyerMasterPojo = new BuyerMasterPojo();

	private UserMasterPojo userMasterPojo = new UserMasterPojo();

	private String isAdmin;

	public BuyerMasterPojo getBuyerMasterPojo() {
		return buyerMasterPojo;
	}

	public Long getBuyerUserId() {
		return buyerUserId;
	}

	public String getIsAdmin() {
		return isAdmin;
	}

	@Override
	public String getPkColumnName() {
		return "buyerUserId";
	}

	public UserMasterPojo getUserMasterPojo() {
		return userMasterPojo;
	}

	@Override
	public boolean isPersisted() {
		if (buyerUserId == null || buyerUserId.intValue() == 0) {
			return false;
		} else {
			return true;
		}
	}

	public void setBuyerMasterPojo(BuyerMasterPojo buyerMasterPojo) {
		this.buyerMasterPojo = buyerMasterPojo;
	}

	public void setBuyerUserId(Long buyerUserId) {
		this.buyerUserId = buyerUserId;
	}

	public void setIsAdmin(String isAdmin) {
		this.isAdmin = isAdmin;
	}

	public void setUserMasterPojo(UserMasterPojo userMasterPojo) {
		this.userMasterPojo = userMasterPojo;
	}

}
